// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// -----------------------------------------------------------------------
using System;

namespace System.ComponentModel.Composition
{
    /// <summary>
    ///     Specifies when an attributed part is discovered by a <see cref="ComposablePartCatalog"/>.
    /// </summary>
    public enum DiscoveryMode : int
    {
        /// <summary>
        ///     Indicates that an attributed part will be discovered by a 
        ///     <see cref="ComposablePartCatalog"/> if a member declared at the level of the type's 
        ///     hierarchy, or if the type itself, is marked with the <see cref="ImportAttribute"/>,
        ///     <see cref="ImportingConstructorAttribute"/>, or <see cref="ExportAttribute"/> 
        ///     attributes. Inherited members are not considered.
        /// </summary>
        Auto = 0,

        /// <summary>
        ///     Indicates that an attributed part will never be discovered by a 
        ///     <see cref="ComposablePartCatalog"/>.
        /// </summary>
        Never = 1,

        /// <summary>
        ///     Indicates that an attributed part will be discovered by a 
        ///     <see cref="ComposablePartCatalog"/> if a member declared anywhere in the type's
        ///     hierarchy, or if the type itself, is marked with the <see cref="ImportAttribute"/>,
        ///     <see cref="ImportingConstructorAttribute"/>, or <see cref="ExportAttribute"/> 
        ///     attributes.
        /// </summary>
        Always = 2,
    }
}
